import type { RouteMeta, RouteRecordRaw } from 'vue-router'
import type { defineComponent } from 'vue'
import {Recordable} from "@/utils/types.ts";
export type Component<T = any> = ReturnType<typeof defineComponent> | (() => Promise<typeof import('*.vue')>) | (() => Promise<T>)

export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
  /*keepAlive?: boolean
  visible?: boolean
  icon?: string
  name: string
  sort?: number
  */
  parentId?: number
  meta: RouteMeta
  props?: Recordable
  /*component?: Component | string
  components?: Component
  componentName?: string
  children?: AppRouteRecordRaw[]
  fullPath?: string*/
}


export type AppRouteModule = AppRouteRecordRaw
